home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global ghardDiskPath, gCDRDrive, prefName
- if the machineType <> 256 then
- if the colorDepth <> 8 then
- alert("Resetting your monitor's color depth to 256 colors.")
- set the colorDepth to 8
- end if
- set ghardDiskPath to the pathName
- set gCDRDrive to "My Neighborhood:Macfiles:"
- set the exitLock to 1
- go(1, gCDRDrive & "splash")
- else
- set prefName to the pathName & "MyNHood.PRF"
- end if
- end
-
- on testEntry
- global gCDRDrive
- delete char 2 to length(field "cd drive") of field "cd drive"
- set temp to getfilenames()
- if getOne(temp, "INTRO") = 0 then
- alert("Can't find the CD-ROM files on drive " & field "cd drive" & ". Please enter a new drive letter.")
- go("drive")
- else
- set gCDRDrive to field "cd drive" & ":\PCFILES\"
- saveDrive()
- set the exitLock to 1
- go(1, gCDRDrive & "splash")
- end if
- end
-
- on getfilenames
- set fileList to []
- set i to 1
- set the itemDelimiter to "."
- set n to getNthFileNameInFolder(field "cd drive" & ":\PCFILES\", 1)
- repeat while n <> EMPTY
- set n to item 1 of n
- append(fileList, n)
- set i to i + 1
- set n to getNthFileNameInFolder(field "cd drive" & ":\PCFILES\", i)
- end repeat
- set the itemDelimiter to ","
- return fileList
- end
-
- on saveDrive
- global prefName
- set lineNum to 1
- repeat while (lineNum <= the number of lines in field "preferences") and not (line lineNum of field "preferences" contains "Drive=")
- set lineNum to lineNum + 1
- end repeat
- put numToChar(10) & "Drive=" into line lineNum of field "preferences"
- put field "cd drive" after line lineNum of field "preferences"
- set prefFile to FileIO(mnew, "write", prefName)
- if not objectp(prefFile) then
- alert("Error writing to file " & prefName)
- else
- prefFile(mWriteString, field "preferences")
- prefFile(mdispose)
- end if
- end
-